home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-04
/
tm480.zip
/
TMMANUAL.EXE
/
TMMAN.MAC
< prev
next >
Wrap
Text File
|
1991-09-10
|
129KB
|
3,811 lines
@video
@macro A,
@colour char,white,blue
@window line23,column3,depth1,width75
<esc>=Main menu,<space>=Select,<return>=Action,<F1>=help,<F2>=Direct Access
@endm
@macro P,
@colour page,cyan,blue
@dim
@endm
@macro X,'SYNTAX '
@macro N,'NOTE '
@macro Y,'NOTE1 '
@macro Z,'NOTES '
@macro V,'EXAMPLE '
@defaults dim,cyan,blue
@head left,"Taskmaster Manual"
@head right,"Copyright (c) FmP 1991"
@head centre,"DIRECT ACCESS"
@nf cr
$P$
@ban
@border
These commands start with the initial letter you specified:
@bbmenu white,red
@repeat x16
{ }
@col char,white,blue
@win line23,column3,depth1,width64
Action: Select and <return> or <esc> to return to previous menu.
@end
@head centre,"HELP"
@nf 1
$P$
@draw
@ban
@border
@col char,cyan,blue
@win line2,column8,depth21,width64
@bright
This is the SHAREWARE TASKMASTER On-line Manual.
@dim
We regret that due to disc space limitations the information is
rather brief. When you register your copy you may purchase a
printed manual which is much more comprehensive.
The on-line manual makes extensive use of Bounce-bar menus. All
you need to know is the action of the following keys: <space>,
<> and <esc>. You may also find it useful to use <>,
<> and <home>.
>C<
Remember: Shareware is NOT FREE. If you are referring to
this manual out of need rather than curiosity then you are
obviously making commercial use of Taskmaster and should
register NOW!
>C<
It may not be obvious but this manual is also a Taskmaster Task!
@bright
@col char,cyan,black
@end
@head centre,"HELP TWO"
@nf 2
$P$
@draw
@ban
@border
@win line2,column8,depth21,width64
Commands in this manual are arranged into functional groups,
each group is available as a topic on the main menu.
Once a topic has been selected a further bounce-bar menu is
displayed. Selection of topics from this secondary menu each
display a single screen of text.
@bright
If you know the name of the command or system variable you are
looking for (perhaps it was mentioned in a screen display), you
may use "Direct Access". To accomplish this press F2 from any
secondary menu and type the name of the command.
@bright
If you spell it incorrectly a list of commands that start with
the specified initial letter will be displayed as a menu -
hopefully including the one you meant to type. Selection of
such a topic will give you Direct Access to the required screen.
You will be returned to your place in the secondary menu after
display.
@colour char,white,green
@bright
This product has taken years of toil and gallons of
midnight oil to perfect, please register your copy today.
@col char,cyan,black
@end
@nf 3
@acceptfk esc
@str min1
@colour char,white,green
@bright
@window line 10,column 20,depth11,width36
@outline cyan
@drop
Direct Access:
If you know the name of the entry
you are interested in you may type
it here, if you get it wrong you
will be presented with a list...
Name of command or system variable
[ ] Press (F10=quit)
@end
@head centre,"Main menu"
@nf X
$P$
@ban
@border
@col char,white,blue
Commands:
@bbmenu white,red
{Arithmetic }
{Data manipulation }
{Conversational-mode input }
{Video handling }
{External program control }
{End User Computing interface }
{Data definition }
{Data initialisation }
{Task flow control }
{Operating Environment control }
{Forms and menus }
{Disc and File handling }
{Diagnostics }
@col char,white,blue
System variables:
@col char,white,red
{part one }
{part two }
@col char,white,blue
General principles:
@col char,white,red
{Conventions and Task layout }
{Taskmaster datatypes }
@col char,white,blue
@win line23,column3,depth1,width73
Actions: <esc>=Exit, <F1>=HELP, <space>=Pick topic, <return>=Action topic
@end
@nf mg
@head left,"General Principles"
$P$
@head centre,"Menu"
@ban
@border
@bbmenu white,red
{The PROTEAN Language }
{User interface }
{Video control }
{Block-structures }
{Menu-structures }
{MS-DOS versions }
{Language conventions one }
{Language conventions two }
{Running Taskmaster Tasks }
{Structure of a task }
{Comments }
{Task layout }
$A$
@end
@nf g1
@head centre,"The PROTEAN Language"
@ban
@border
PROTEAN is the name given to both a programming language and the
full implementation of that language. Taskmaster is an
implementation of a subset of PROTEAN containing the job control
and screen handling commands of the PROTEAN language. Most
Taskmaster commands are also available in PROTEAN.
Taskmaster can interface to EUC, the End-User-Computing option.
The commands that allow this are not available in the PROTEAN
product. Taskmaster is available only as an interpreter, PROTEAN
however can interpret source code, generate intermediate code
and execute generated code.
CDOS and Unix version of Taskmaster are also available.
The PROTEAN language is high level, block structured and very
flexible.
@end
@nf g2
@head centre,"User Interface"
@ban
@border
The user interface provided by Taskmaster is sophisticated but
user-friendly and consistent. It allows total flexibility in
terms of colour and layout, and makes available most of the
features of the video on which Taskmaster is executing. FORMS
may be overlayed and windowed.
Taskmaster tasks can make decisions to determine what jobs are
run, when and in what order. Taskmaster can also provide
programs with their run-time parameters and data.
@end
@nf g3
@head centre,"Video control"
@ban
@border
Taskmaster can control your video by means of a set of control
sequences held in a "video definition" file. It is possible to
drive different videos by using different definition files.
Taskmaster can display menus and forms containing up to twenty
"unprotected fields" for data collection.
Not only is Taskmaster able to invoke packaged programs; it also
possesses the ability to request the necessary parameters
required by them.
Most PC users and in particular new users, welcome the ability
to access the facilities of MS-DOS through the use of menus and
forms. In large organisations, the Management Information
Services department can write the TASKS they believe will best
support their user base.
Taskmaster is, we believe, unique in providing an Interpretive
block-structured job-control language with a fully integrated
Display Manager which compares favourably with any other Display
Manager we have seen.
@end
@nf g4
@head centre,"Block-structures"
@ban
@border
The language supports block structured coding via the IF, WHILE,
UNTIL, ELSE and FI commands.
IF conditional_expression
{{CODE-BLOCK}}
{{ELSE}}
{{CODE-BLOCK}}
FI
WHILE conditional_expression
{{CODE-BLOCK}}
FI
UNTIL conditional_expression
{{CODE-BLOCK}}
FI
Such structures can be nested to 48 levels. In the foregoing,
{{CODE-BLOCK}} can be any command or commands which will be
executed if the conditional expression preceding evaluates to
TRUE. The conditional expression can be complex.
@end
@nf g5
@head centre,"Block-structures 2"
@ban
@border
Other forms of {{CODE-BLOCK}} are provided for MENU handling by:
OPTION identifier
{{CODE-BLOCK}}
RETURN
In this case the {{CODE-BLOCK}} could include further MENUS
providing a nesting capability to 16 levels. The RETURN command
provides the flexibility to return directly to any of the higher
level menus.
Note that 'menu commands' may be
used even when a physical menu is menu 1,cval
not required. This is called a option 1,1,10
Virtual menu and can be used to displayln "CVAL = " cval
implement CASE constructs. increment cval
Instead of a menu_name being given return
as a parameter to the MENU command option 1,11
an INT VAR is given. The option displayln "CVAL = 11"
actioned is based on the value of exitm
this integer whenever the MENU endm 1
would normally be displayed.
@end
@nf g6
@head centre,"MS-DOS versions"
@ban
@border
Taskmaster is designed to run with all versions of MS-DOS from
version 2.0 onwards on machines having IBM compatible ROM BIOS.
If running under version 4, it will make use of multi-tasking
facilities where possible and is classified as well-behaved in
that environment.
@end
@nf g7
@head centre,"Language conventions"
@ban
@border
@gon
7------------------------------------------------------------------9
0 Language conventions 0
4-----------------------8------------------------------------------6
0Character strings 0 The first byte of a character string or 0
0 0 variable is referred to as byte 0. 0
4-----------------------5------------------------------------------6
0Conditional expressions0 The AND operator always takes precedence 0
0 0 over OR. 0
4-----------------------5------------------------------------------6
0Loops 0 To obey a loop a set number of times, 0
0 0 the controlling integer always has a 0
0 0 starting value of zero, e.g. 0
0 0 0
0 0 clear i 0
0 0 until i = 10 0
0 0 displayln entry i of list 0
0 0 fi i 0
0 0 0
0 0 displays 10 lines. 0
1-----------------------2------------------------------------------3
@end
@nf g8
@ban
@border
@gon
7------------------------------------------------------------------9
0 Language conventions 0
4-----------------------8------------------------------------------6
0 Source lines 0 The first line of a task is regarded as 0
0 0 line 1. This is generally compatible 0
0 0 with editors and word processors that 0
0 0 display line numbers. 0
4-----------------------5------------------------------------------6
0 Syntax Definitions 0 Sections enclosed in braces {{like this}} 0
0 0 indicate an optional parameter or list 0
0 0 of parameters. 0
4-----------------------5------------------------------------------6
0 Tables 0 The first entry of a table-of-var is 0
0 0 entry 0. 0
4-----------------------5------------------------------------------6
0 Video line and 0 The home position on the screen is 0
0 column numbers 0 referred to as line 0, column 0. 0
1-----------------------2------------------------------------------3
@end
@nf g9
@head centre,"Running Taskmaster Tasks"
@ban
@border
Taskmaster is always invoked by typing :
TM name-of-task
Taskmaster does not have the code-generation facility available
with the PROTEAN product. This is not however a disadvantage,
since Taskmaster performance when running a task interpretively
is quite acceptable for the purpose.
A task is the name given to a file containing a Taskmaster
program and has a filename of taskname.TSK.
@end
@nf ga
@head centre,"Structure of a task"
@ban
@border
A task is a set of commands held in a file having an extension
of TSK, e.g. COMMS.TSK.
Most tasks need to manipulate data, for example, data gathered
from a form or menu, or in response to questions. All data can
be referred to by a symbolic name and these names need to be
declared at the beginning of the task file - the data
declarations.
Data declarations are terminated by an END command.
Following the data declarations are the commands which execute
the task. Only one command per line may be specified, a line
being defined as data terminated by <carriage-return> <line-
feed>. This format is compatible with standard MS-DOS Editors
and Word processing packages.
@end
@nf gb
@head centre,"Comments in Tasks"
@ban
@border
Comments may occur on any line of a Taskmaster task. The
comment must appear at the end of the line and must start with a
semi-colon. If the line is blank (except for the comment) the
semi-colon must be in column 1. Completely blank lines are
permitted, as is free format text after the ENDTASK command.
The last command in a task is normally the ENDTASK command but
this command is optional for Taskmaster.
@end
@nf gc
@head centre,"Task layout"
@ban
@border
DATA DECLARATIONS
END command
Executive COMMANDS }} The executable code
ENDTASK
The ENDTASK command tells Taskmaster where to find the PHYSICAL
end of the task.
@end
@nf mh
@head left,"Taskmaster Datatypes"
$P$
@head centre,"Menu"
@ban
@border
@bbmenu white,red
{STRING }
{LITERAL }
{HEX VARIABLE }
{INTEGER CONSTANT }
{HEXADECIMAL CONSTANT }
{VARIABLE }
{TABLE-OF-VARIABLES }
{INTEGER VARIABLE }
{LOGICAL VARIABLE }
{SYSTEM VARIABLE }
{VIDEO CONSTANT }
{ENVIRONMENT VARIABLES }
{THE STANDARD LIST }
$A$
@end
@nf h1
@head centre,"STRING Datatype"
@ban
@border
A sequence of characters, e.g. XYZ. It cannot contain spaces or
commas and lower-case characters will be converted to upper-
case.
Strings are not explicitly defined in the data section of a
task.
@end
@nf h2
@head centre,"LITERAL Datatype"
@ban
@border
Up to 255 characters enclosed in single or double-quotes, e.g.
"XYZ". Characters so enclosed may include spaces and commas.
Lower-case characters are NOT converted to upper-case.
@end
@nf h3
@head centre,"HEX VARIABLE"
@ban
@border
A hexadecimal value, i.e. a string of hexadecimal digits (0-9,
A-F) held as a string of characters in a user-defined area. The
size of the variable is calculated as half the number of
supplied digits.
The number of hex digits supplied must always be even, i.e. the
hexadecimal digits must be supplied in pairs.
It may be used in any context where a variable is valid.
Initial value : user defined
Sample Declaration
HEXVAR NEWLINE,0D0A
@end
@nf h4
@head centre,"INTEGER CONSTANT"
@ban
@border
A number in the range -32768 to 32767 or 0 to 65535 depending on
requirements. When displayed using a DISPLAY, DISPLAYLN or
CURSOR command INTEGERs take 5 screen positions (6 if negative -
including minus sign).
@end
@nf h5
@head centre,"HEXADECIMAL CONSTANT"
@ban
@border
A 16-bit hexadecimal constant may be used in place of an integer
constant by specifying the hexadecimal digits followed by 'H',
e.g. 30H.
The first hexadecimal digit must always be numeric. Thus for
example, the hex constant A1A2 must be expressed as 0A1A2H.
The maximum number of characters allowed is therefore six,
including an optional leading zero and terminating 'H'.
EXAMPLES:
DEFINE FUNCTION,01H
DEFINE CONST2,0B1B9H
MOVE 3AH TO X1
ADD 20H TO ICHAR
@end
@nf h6
@head centre,"VARIABLE"
@ban
@border
A string of bytes held in an area named by the user. The
maximum length must be defined. Data can be assigned to the
variable during data declaration.
Default value : SPACES
Sample Declaration
VAR INPUT_FILE,14,"A:INVOICE.DAT"
VAR LONG_MESSAGE,400,
"The text assigned to this message can be defined over "
"any number of lines, each line enclosed with single or "
'double quotes. Each line may be any length '
"The text should be terminated by a blank line. "
"The data will contain trailing spaces to the maximum "
"size declared."
Initially the size of the variable is the size of default data
declared.
@end
@nf h7
@head centre,"TABLE-OF-VARIABLES"
@ban
@border
An array of variables which may be subscripted.
Default value : SPACES
Sample Declarations
1. VAR NAMES,20,OCCURS 50
2. VAR MESSAGES,3,OCCURS 2,"YesNo "
3. var day_table,9,occurs 7,
'Sunday Monday Tuesday Wednesday'
'Thursday Friday Saturday '
until count = 7
displayln entry count of day_table
fi count
@end
@nf h8
@head centre,"INTEGER VARIABLE"
@ban
@border
A number in the range -32768 to 32767 or 0 to 65535 held in a
user-defined area. Up to 40 can be supplied in a single
declaration, subject to the maximum line length of 162 bytes.
Initial value : ZERO
Sample Declaration
INT COUNT,ERRORS
@end
@nf h9
@head centre,"LOGICAL VARIABLE"
@ban
@border
A value of TRUE or FALSE held in a user-defined area. The value
may be tested by using an IF command of the form :
IF logical_variable_name
Default value : FALSE
Sample Declaration
LOGICAL END_OF_RUN,REPEAT_RUN
Up to 40 LOGICAL VARIABLES can be declared in a single
declaration, subject to the maximum line length of 162 bytes.
@end
@nf ha
@head centre,"SYSTEM VARIABLE"
@ban
@border
An area containing system data which may be read by the user.
Some system variables are read-only, i.e. you cannot change
their value. An example of a system variable is DATE.
Initial value : implementation dependent
System variables are "built-in" and are not therefore declared
by the user.
@end
@nf hb
@head centre,"VIDEO CONSTANT"
@ban
@border
A user-defined name associated with a video control sequence
allowing you to write video independent code.
Default value : NONE
Sample Declaration
VCONST CLEAR_SCREEN,11
VCONST CLEAR_TO_END_OF_LINE,55
@end
@nf hc
@head centre,"ENVIRONMENT VARIABLES"
@ban
@border
Taskmaster provides easy access to DOS environment variables.
You may specify that the value of an environment variable be
used as default data in a VAR declaration for example:
VAR PATH,64,$PATH
sets the variable PATH to the contents of the PATH environment
variable. If the named environment variable doesn't exist the
VAR will be initialised in the normal way (SPACE filled and
length 0). The $ENVIRONMENT_VAR syntax variant can also be used
in MOVE commands.
@end
@nf hd
@head centre,"The Standard List"
@ban
@border
Throughout this manual syntax definitions refer to the "Standard
list of datatypes".
This generally means that the command will accept a space
separated list of virtually any datatypes. Space doesn't permit
a full description, but the subject is covered in detail in the
printed manual.
In the absence of the full documentation the advice must be: try
it, if the datatype is not permitted a suitable error message
will be generated.
@end
@nf i1
@head centre,"Data Naming Conventions"
@ban
@border
Names for user-defined datatypes
Names for datatypes may consist of the following characters:
A-Z, a-z, 0-9, Underscore (_)
The first character of a name must be alphabetic.
Naturally, some users prefer to give meaningful names to
variables and this may necessitate long names. Use of the
underscore character in long names can improve readability of
the task. If used, underscore characters are significant, that
is to say they must always be included wherever the name is
used.
@end
@nf i2
@head centre,"Datatype search order"
@ban
@border
When Taskmaster scans a command which requires one or more
datatypes to be present, it searches in a specific order. You
need to be aware of this to avoid ambiguity.
The following example demonstrates the potential ambiguity.
A variable called FILENAME is declared of length 10 characters,
used to contain a MS-DOS filename. The DATA statement stacks up
characters to be supplied to the next loaded program. The RUN
command loads the named program and enters it.
VAR FILENAME,7,"AAA.IDX"
DATA FILENAME
RUN "PROGRAM"
If a variable called FILENAME had not been previously defined,
Taskmaster would treat FILENAME as a string of characters.
@end
@nf i3
@head centre,"Scanning order"
@ban
@border
Taskmaster infers the datatype by scanning in the order below:
user-defined names,
system_names,
strings,
literals,
integer constants
subject to allowable datatypes for the command.
@end
@nf i4
@head centre,"Available memory"
@ban
@border
Taskmaster has the capability to shrink down to approximately 2k
in size when it loads another program using the LARGE command.
This small residual size will allow all but the largest of
applications to be run.
@end
@nf me
@head left,"SYSTEM VARIABLEs (one)"
$P$
@head centre,"Menu"
@ban
@border
@bbmenu white,red
{ANYFK }
{ASKMASK }
{BBDISP }
{BBMASK }
{more }
{CHOICE }
{DATE }
{DELAY }
{DDRIVE }
{DELIM }
{DISPLAY }
{ECHO }
{ELEVEL }
@col char,white,red
@win line2,column14,depth13,width60
Set if any function key hit on PUT command
Controls which special keys are active during ASK
Controls re-display of menus on RETURN command
Controls which special keys are active for PUT and MENU
Diagram
Set to indicate the choice made from Bounce-bar menu
The Current System date
Controls timing interval
Default drive
Defines delimiter for SCAN command
Last Bounce-bar topic text or last DISPLAYLN text
Controls echo of typed characters
Set by BATCH files to value of ERRORLEVEL
$A$
@end
@nf e1
@head centre,"ANYFK (read-only)"
@ban
@border
This logical variable is reset on the execution of each PUT and
MENU command. It has the value TRUE if the user presses any of
the function keys F1 to F11.
@end
@nf e2
@head centre,"BBMASK / ASKMASK example:"
@ban
@border
To activate the ESC key, F1, F10 and END:
MOVE 0C021H TO BBMASK
Note that the leading zero is only required where the first hex
digit is non-numeric but the trailing H is mandatory.
Diagrammatic representation for derivation of value of BBMASK in
the example given:
@gon
7--------------8--------------8--------------8-------------9
0 0 0 0 0
0byte 0 0byte 1 0byte 2 0byte 3 0
4--------------5--------------5--------------5-------------6
0 0 0 0 pg pg 0
0ESC F1 F2 F30F4 F5 F6 F70F8 F9 F10 0 up dn end0
01 1 0 0 00 0 0 0 00 0 1 000 0 0 10
08 + 4 + 0 + 0 00 + 0 + 0 + 0 00 + 0 + 2 + 000 + 0 + 0 + 10
0C 00 02 01 0
1--------------2--------------2--------------2-------------3
Note: ASKMASK is similar to BBMASK but can only activate function
keys and is active when the ASK command is encountered.
Activated function keys can be detected using ANYFK and FUNKEY.
@end
@nf e3
@head centre,"BBDISP (read/write)"
@ban
@border
This is a system logical variable with a default value = TRUE.
Normally upon return to a MENU or PUT command that was used to
display a bounce-bar menu, the bounce-bar menu is redisplayed.
Although the display is swift, it can give rise to an unsightly
flicker. If there is no reason to redisplay the menu, i.e.
that part of the screen has not changed, you can suppress the
redisplay by clearing BBDISP, i.e. setting it to a value =
FALSE.
The colour attributes of the highlighted bar will be reset even
when the menu is not redisplayed.
On re-entry to the menu, BBDISP will automatically be reset to
TRUE.
@end
@nf e4
@head centre,"BBMASK (read/write)"
@ban
@border
If you are using SCR bounce-bar menus, the value of BBMASK
determines which of the following keys (in addition to RETURN)
will cause an exit from the MENU command:
ESC
F1 - F10
LEFT ARROW
RIGHT ARROW
Page-up/Page-Down
END
BBMASK is an integer variable normally set with a command of the
form:
MOVE vwxyH TO BBMASK
where vwxy is a sequence of 4 hex digits that are bit
significant:
v determines ESC and F1 F2 and F3,
w determines F4 - F7
x determines F8 - F10 and LEFT Arrow
y determines RIGHT ARROW, PG-UP, PG-DN and END.
@end
@nf e5
@ban
@border
@gon
7-----8---------------8------------------8--------------------9
0 Bit 0 Key 0 Option to 0 If CLEAR 0
0 0 0 execute if SET 0 0
4-----5---------------5------------------5--------------------6
0 0 0 ESC 0 30 0 Ignore 0
0 1 0 F1 0 31 0 Ignore 0
0 2 0 F2 0 32 0 Ignore 0
0 3 0 F3 0 33 0 Ignore 0
0 4 0 F4 0 34 0 Ignore 0
0 5 0 F5 0 35 0 Ignore 0
0 6 0 F6 0 36 0 Ignore 0
0 7 0 F7 0 37 0 Ignore 0
0 8 0 F8 0 38 0 Ignore 0
0 9 0 F9 0 39 0 Ignore 0
0 10 0 F10 0 40 0 Ignore 0
0 11 0 Left arrow 0 41 0 highlight previous 0
0 12 0 Right arrow 0 42 0 highlight next 0
0 13 0 Page Up 0 43 0 Ignore 0
0 14 0 Page Down 0 44 0 Ignore 0
0 15 0 END 0 45 0 Ignore 0
1-----2---------------2------------------2--------------------3
@end
@nf e6
$P$
@head centre,"CHOICE (read/write) "
@ban
@border
This integer variable is provided to enable you to determine the
number of the last menu-selection made via the MENU command. It
is particularly useful in the following context:
MENU 1,"MENU_NAME"
OPTION 1,1
commands for option 1
OPTION 1,2
OPTION 1,3
IF CHOICE = 2
commands specific to option 2
FI
commands common to both options 2&3
IF CHOICE = 3
commands specific to option 3
FI
OPTION 1,4 etc...
@win line5,column43,depth10,width34
@draw
>1<
If you are using SCR bounce-bar
menus, the value of CHOICE at the
time the MENU command is obeyed
dictates where the bounce bar is
placed. If the value of CHOICE
corresponds to a valid option
number, the bar will be placed on
that option. Otherwise, it is
always placed on the first
option.
>1<
@end
@nf e7
@head centre,"DATE (read-only) "
@ban
@border
A character variable containing the current date in the form
DD/MM/YY, provided that the correct date has been set using the
MS-DOS utility before loading.
This variable in common with LDATE and IDATE is set on loading
Taskmaster. However to overcome possible problems caused when
the system TIME passes 24:00 hrs they are reset whenever a
MOVE DATE TO VARIABLE
command is encountered.
Date changes are recognised automatically when menus and forms
are displayed resulting in the latest date always being
displayed on the "userline".
@end
@nf e8
@head centre,"DELAY (read/write)"
@ban
@border
This system integer variable contains the number of ticks per
second. You may alter its value in order to adjust various time-
delays within Taskmaster.
@end
@nf e9
@head centre,"DDRIVE (read-only) "
@ban
@border
This read-only character variable is a single character in the
range A through P which corresponds to the drive identifier
letter relating to the currently selected drive.
EXAMPLE
If Taskmaster was invoked from the command line:
C>TM FRED
then DDRIVE would contain the character "C" which could be
referenced in the task called FRED.TSK
@end
@nf ea
@head centre,"DELIM (read/write) "
@ban
@border
This variable is used to define the delimiter used by the SCAN
command.
@end
@nf eb
@head centre,"DISPLAY (read/write) "
@ban
@border
This character variable contains a copy of the data last
displayed using the DISPLAYLN command or the text of the last
topic highlighted on a bounce-bar menu - whichever was the most
recent.
@end
@nf ec
@head centre,"ECHO (read/write)"
@ban
@border
When this logical variable is unset (to FALSE) it suppresses the
display of characters entered at the keyboard in response to ASK
commands. It is particularly useful when asking for PASSWORDS
etc.
ECHO increases privacy when entering sensitive data. A parallel
facility is provided for screen forms as described in the SCR
manual, namely the inclusion of an exclamation mark as the first
character within a box on the screen.
@end
@nf ed
@head centre,"ELEVEL (read/write)"
@ban
@border
The value of the MS-DOS parameter ERRORLEVEL returned by MS-DOS
in response to applications loaded is stored in ELEVEL on
return to Taskmaster.
See the RUN command for further details.
@end
@nf mf
@head left,"SYSTEM VARIABLEs (two)"
$P$
@head centre,"Menu"
@ban
@border
@bbmenu white,red
{FALSE }
{FCOL }
{FOUND }
{FREE }
{FUNKEY }
{HIDE }
{HILITE }
{KEY }
{KEYVAL }
{LDATE }
{RESP }
{more }
{ROW }
{SYSMAX }
{SYSFREE }
{TIME }
{TIMER }
{TRUE }
@col char,white,red
@win line2,column14,depth18,width60
May be moved to a LOGICAL
Match position in "IF thing ct other_thing"
Returns result of many commands e.g. LOOKFOR
Reports free memory in task
The function key number if ANYFK set
Suppress display of program load command (RUN and LARGE)
On exit from Bounce-bar menu: The highlit topic number
Set TRUE if key pressed during WAIT or INKEY
The character pressed resulting in KEY being set
Long format date
Returns response from many commands e.g. RUN
Summary of use
The entry number of match in "IF table ct thing"
The RAM configuration
Reports free memory in machine
Current system time
Sets timeout for forms and menus
May be moved to a Logical
$A$
@end
@nf f1
@head centre,"FALSE (read-only) "
@ban
@border
One of two values which may be assigned to a LOGICAL VARIABLE.
The value may be tested using an IF command of the form:
IF logical_variable_name
If the value is FALSE, the result of the IF expression will be
FALSE.
@end
@nf f2
@head centre,"FCOL (read/write) "
@ban
@border
This integer variable points to the first matching character
located by FIND and IF commands and all other conditional
commands using the CONTAINS (CT) or STARTS (SW) operators.
NOTE1 A value of 0 indicates a successful match at the beginning of a
string.
NOTE2 The value of FCOL is indeterminate following unsuccessful
FIND commands.
NOTE3 FCOL is evaluated during IF commands of the form:
IF datatype_1 CT
SW datatype_2
@end
@nf f3
@head centre,"FOUND (read/write) "
@ban
@border
This is a system LOGICAL variable - summary of use
@gon
7---------------------------------------8---------9
0 EVENT 0 COMMAND 0
4---------------------------------------5---------6
0 Scanning variables and items 0 SCAN 0
0 Finding a file 0 LOOKFOR 0
0 Finding a file 0 DIR 0
0 Finding entries in table-of-var 0 FIND 0
0 Reading a Volume label 0 GETVOL 0
0 Sub-linear string operations 0 IF 0
1---------------------------------------2---------3
@end
@nf f4
@head centre,"FREE (read-only)"
@ban
@border
This integer variable contains a number which is the amount of
free memory at any given point in a task. It may only be used
in conjunction with the DISPLAY or DISPLAYLN commands, e.g.
DISPLAYLN "Free memory " FREE
@end
@nf f5
@head centre,"FUNKEY (read-only)"
@ban
@border
This integer variable is set when you press a function key
whilst a FORM or MENU is displayed instead of the normal
<RETURN>. If return is pressed then FUNKEY will have a value of
zero. If a function key numbered 1 - 11 is pressed the value
of FUNKEY will be set to the corresponding value.
@end
@nf f6
@head centre,"HIDE (read/write)"
@ban
@border
This logical variable when set (to TRUE) suppresses the command
line display usually seen when executing programs via the RUN
command. The default is FALSE.
HIDE enables command parameters to be hidden from the user,
which can be important in certain situations.
@end
@nf f7
@head centre,"HILITE (read-only)"
@ban
@border
This system integer variable contains the position of the
currently highlighted bar of the currently displayed bounce-bar
menu. When a key is pressed which causes an escape from the
menu, i.e. RETURN, ESC, Function keys, cursor left or right,
the value of CHOICE is set to identify the key pressed and
HILITE will contain the option number currently highlighted.
When a highlighted option is selected by pressing the return
key, both CHOICE and HILITE will contain the same value.
@end
@nf f8
@head centre,"KEY (read/write)"
@ban
@border
Updated after PUT and WAIT commands when specifying a delay
period and by the INKEY command.
When using the PUT and WAIT commands the value of this logical
variable enables the user to recognise if a keyboard key was
pressed during the delay period, causing the delay to terminate
prematurely.
When using the INKEY command without a parameter, checking the
value of KEY will determine if a break-in has been requested.
See also KEYVAL.
@end
@nf f9
@head centre,"KEYVAL (read/write)"
@ban
@border
This character variable is provided for use in connection with
the logical variable KEY.
It contains the value of the keyboard character depressed which
resulted in KEY being set to TRUE.
It will be set if you press a key during any of the following
commands:
PUT "FORM_NAME" WAIT n
WAIT n
WAIT
@end
@nf fa
@head centre,"LDATE (read-only) "
@ban
@border
The long format date. A character variable containing the
current date in calendar date format, i.e.
DD MMM YYYY
where
DD is the day of the month,
MMM is the month, e.g. MAR, SEP,
and YYYY is the year, e.g. 1990.
@end
@nf fb
@head centre,"RESP (read-only) "
@ban
@border
This integer variable is set by MS-DOS during the execution of
various commands. A value of zero normally indicates SUCCESS.
@gon
7-----------------------------------8---------------9
0 EVENT 0 COMMAND 0
4-----------------------------------5---------------6
0 Searching for a file 0 LOOKFOR 0
0 Searching for a file 0 DIR 0
0 Attaching a LIST device 0 PRINTER 0
0 Creating a file for DATA 0 BEHAVE 0
0 Writing to a DATA file 0 DATA 0
0 Assigning a default drive 0 SELECT 0
0 String Replacement 0 REPLACE 0
0 User specified TIME-OUTS 0 MENU, PUT 0
0 Loading a program 0 RUN/LARGE 0 See next page
0 Erasing a file 0 ERASE 0
0 Taskmaster login 0 LOGIN 0
0 Reading/Writing to files 0 RESTORE/SAVE 0
0 Changing directory 0 USER 0
0 Opening the EUC Catalogue 0 CATALOG 0
0 Changing users Password 0 PASSWORD 0
1-----------------------------------2---------------3
@end
@nf fc
@ban
@border
The following responses may be returned in RESP
@gon
7-----------8------8---------------------------------------------9
0 COMMAND 0 RESP 0 MEANING 0
4-----------5------5---------------------------------------------6
0 RUN/LARGE 0 0 0 Success 0
0 RUN/LARGE 0 2 0 Invalid COMSPEC or C:\COMMAND.COM not found 0
0 RUN/LARGE 0 5 0 Access denied to COMMAND.COM or COMSPEC 0
0 LARGE 0 6 0 Unable to create swap file 0
0 LARGE 0 7 0 Disc write error on swap file 0
0 RUN/LARGE 0 8 0 Insufficient memory available 0
0 RUN/LARGE 0 10 0 Environment invalid 0
0 RUN/LARGE 0 11 0 Taskmaster internal error or system corrupt 0
1-----------2------2---------------------------------------------3
Some responses result in an error message and wait for a key
to be pressed. None of the above are fatal errors, task
execution continuing at the next command.
It is important to check the response in your tasks !
@end
@nf fd
@head centre,"ROW (read-only) "
@ban
@border
This is an integer variable used when searching tables. See the
section on the FIND command for detailed information.
@end
@nf fe
@head centre,"SYSMAX (read-only)"
@ban
@border
This integer variable contains the size of the computer's basic
memory in Kilobytes. This excludes any extended memory that may
be present. This is normally 640.
@end
@nf ff
@head centre,"SYSFREE (read-only)"
@ban
@border
SYSFREE is a variable containing the characters nnnK, where nnn
is the number of Kilobytes of free basic memory available at any
given time.
The figure of free memory represents the amount of available
memory for loading other programs and takes into account any
residual memory requirements of Taskmaster.
This variable is most often used as an insert in the main-menu
of tasks that serve to load and run other programs, e.g.
MENU 1,'MAIN-MENU',SYSFREE
This causes substitution of the character string "nnnK" at the
position in an SCR generated Menu between "curly braces".
@end
@nf fg
@head centre,"TIME (read-only)"
@ban
@border
A character variable containing the current time in the form
HH:MM:SS, provided that the system DATE/TIME utility was used to
set the correct time.
This variable is extremely useful, since it allows work to be
scheduled for running at any time of the day, e.g.
UNTIL TIME STARTS "10:0"
WAIT 60
FI
RUN "PROGRAM"
Note that the WAIT command will not waste processor resource on
multi-tasking operating systems.
@end
@nf fh
@head centre,"TIMER (read/write)"
@ban
@border
This integer variable is used to control optional timeouts from
MENUS and FORMS. To activate a timeout for a form or menu
simply move a numeric value to TIMER before the PUT or MENU
command.
Unless you have changed DELAY, the value will specify a time in
seconds. During periods of keyboard inactivity the timer
value will count down and if it reaches zero before a key is
pressed a timeout will occur. The timeout will reset each time
a key is pressed. For a MENU command timeout, control will pass
to option 99. For a PUT command timeout, the value 99 will be
set in RESP.
Taskmaster automatically uses the appropriate value of TIMER
for each menu even when returning to higher level menus (using
the RETURN n syntax variant).
Timeouts are used in several of the example tasks.
@end
@nf fi
@head centre,"TRUE (read-only) "
@ban
@border
One of two values which may be assigned to a LOGICAL VARIABLE.
The value may be tested using an IF command of the form:
IF logical_variable_name
If the value is TRUE, the result of the IF expression will be
TRUE.
@end
@nf m1
@head left,"Arithmetic commands"
$P$
@head centre,"Menu"
@ban
@border
@bbmenu white,red
{ADD }
{DECREMENT }
{DIVIDE }
{INCREMENT }
{MULTIPLY }
{SUBTRACT }
@col char,white,red
@win line2,column14,depth6,width60
Add 2 integers
Take 1 from an integer
Divides one integer by another
Add 1 to an integer
Multiplies one integer by another
Subtract one integers from another
$A$
@end
@nf 11
@head centre,"The ADD command"
@ban
@border
PURPOSE Adds two datatypes placing the result in the second
datatype or optionally in a third datatype.
$X$ ADD datatype-1 TO datatype-2 {{GIVING datatype-3}}
where:
datatype-1, dataype-2 and dataype-3 are integers.
$Y$ The datatype to recieve the result (datatype-2 or
datatype-3 if present) must be an INT variable.
NOTE2 Adding 1 to an INT variable is best achieved by using the
INCREMENT command on grounds of performance.
@end
@nf 12
@head centre,"The DECREMENT command"
@ban
@border
PURPOSE Decrements the value of one or more INT variables by 1.
$X$ DECREMENT int {{int ...}}
$Y$ DECREMENT thing is preferred to:
SUBTRACT 1 FROM thing
on grounds of performance and economy of memory.
NOTE2 If more than one INT variable is specified, they should
be separated by spaces.
NOTE3 A given INT var may be named more than once.
$V$ DECREMENT COUNT INDEX
EXAMPLE2 DECREMENT COUNT COUNT FRED
@end
@nf 13
@head centre,"The DIVIDE command"
@ban
@border
PURPOSE Divides one datatype by another placing the result in
the first datatype.
$X$ DIVIDE datatype-1 BY datatype-2
where:
datatype-1 and dataype-2 are integers.
$Y$ The remainder if any will be placed in RESP.
@end
@nf 14
@head centre,"The INCREMENT command"
@ban
@border
PURPOSE Increments the value of one or more INT variables by 1.
$X$ INCREMENT int {{int...}}
$Z$ This command is preferable to using the ADD command
because it is faster.
$V$ Display text on lines 10 to 19 of the screen:
CLEAR I
MOVE 10 TO J
UNTIL I = 10
CURSOR J 0 TEST
INCREMENT J
FI I
@end
@nf 15
@head centre,"The MULTIPLY command"
@ban
@border
PURPOSE Multiplies one datatype by another placing the result in
the first datatype.
$X$ MULTIPLY datatype-1 BY datatype-2
where:
datatype-1 and dataype-2 are integers.
@end
@nf 16
@head centre,"The SUBTRACT command"
@ban
@border
PURPOSE Subtracts one datatype from a second datatype placing the
result in the second datatype or optionally in a third
datatype.
$X$ SUBTRACT datatype-1 FROM datatype-2 {{GIVING datatype-3}}
where:
datatype-1, dataype-2 and datatype-3 are integers.
$Z$ The DECREMENT command is provided as an alternative to
"SUBTRACT 1".
$V$ SUBTRACT 11 FROM COUNT
@end
@nf m2
@head left,"Data manipulation"
$P$
@head centre,"Menu"
@ban
@border
@bbmenu white,red
{APPEND }
{COMBINE }
{DECODE }
{ENCODE }
{FIND }
{MOVE }
{REPLACE }
{REVERSE }
{SCAN }
{SETSCAN }
{TRIM }
{UPPER }
@col char,white,blue
(See the Data Initialisation Menu for CLEAR and SIZEVAR)
@col char,white,red
@win line2,column14,depth12,width60
Appends data to end
Combination of datatypes
Decodes encrypted data
Data encryption
Table searching
Data manipulation
String manipulation
Date manipulation for sorting
Data extraction
Data extraction
Removes trailing spaces
Forces characters to UPPER CASE
$A$
@end
@nf 21
@head centre,"The APPEND command"
@ban
@border
PURPOSE To append the contents of a list of datatypes to a var.
The command has similarities with the COMBINE command.
$X$ APPEND standard_list_of_datatypes TO var
$Z$ Truncation will occur if the receiving var is not large
enough to receive the list_of_datatypes.
$V$ APPEND 40 "Page " PAGE_COUNT TO TITLE
If var TITLE contains "SUMMARY" and int PAGE_COUNT = 25,
then on completion of this example it will contain
SUMMARY Page 25
@end
@nf 22
@head centre,"The COMBINE command"
@ban
@border
PURPOSE Concatenates a list-of-datatypes into a single datatype.
$X$ COMBINE standard_list_of_datatypes INTO datatype-2
$Y$ Datatype-2 must have been previously defined and be
of type VAR with a length greater than or equal to the
combined lengths of the list_of_datatypes.
NOTE2 If the combined length of all the datatypes is greater
than the declared size of datatype-2, characters will be
moved until datatype-2 is full.
@end
@nf 23
@head centre,"The DECODE command "
@ban
@border
PURPOSE To decode data which has been encrypted using the ENCODE
command.
$X$ DECODE var USING key
where data is type VAR.
key is type VAR.
$Y$ Can be used as the basis of very sophisticated security
systems as it would be extremely difficult to break the
encryption code.
NOTE2 This command is complementary to the ENCODE command.
@end
@nf 24
@head centre,"The ENCODE command"
@ban
@border
PURPOSE To encrypt data using a key supplied by the user.
$X$ ENCODE data USING key
where data is type VAR.
key is type VAR.
@end
@nf 25
@head centre,"The FIND command"
@ban
@border
PURPOSE Finds an entry in a table of VAR, containing a specified
character pattern.
$X$ FIND table-of-VAR comparison {{CASE}} var
literal
@gon
Where comparison: 7------------------------------8--------9
0startswith 0SW 0
0contains 0CT 0
0equals 0= or EQ 0
0greater than 0> or GT 0
0less than 0< or LT 0
0greater than or equal to 0>= or GE0
0less than or equal to 0<= or LE0
0not equal to 0<> or NE0
1------------------------------2--------3
@goff
$Y$ CASE should be specified when case is significant.
NOTE2 FOUND will indicate success or failure. If TRUE then ROW
indicates matching entry number.
NOTE3 The tilde character "~" matches any character.
@end
@nf 26
$P$
@head centre,"The MOVE command"
@ban
@border
PURPOSE
Moves data from one datatype to another.
$X$
MOVE datatype-1 TO
datatype-2 {{WITH LEAD_ZEROES}}
Where:
datatype-1 and datatype-2 are
any valid combination see table:
Valid MOVE commands are shown
in the table:
@win line2,column45,depth21,width30
@gon
7--------------8-------------9
0 datatype-1 0 datatype-2 0
4--------------5-------------6
0 VAR 0 VAR 0
0 0 INT 0
0 0 LOGICAL 0
4--------------5-------------6
0 LITERAL 0 VAR 0
4--------------5-------------6
0 INT 0 VAR 0
0 0 INT 0
4--------------5-------------6
0 SYSTEM var 0 VAR 0
0 0 LOGICAL 0
0 0 INT 0
4--------------5-------------6
0 LOGICAL 0 VAR 0
0 0 LOGICAL 0
4--------------5-------------6
0 VCONST 0 VAR 0
1--------------2-------------3
@end
@nf 27
@head centre,"The REPLACE command "
@ban
@border
PURPOSE Allows replacement of 1st or all occurences of a sequence
of characters within a VAR with another.
$X$ REPLACE {{ALL}} VAR-1 OF VAR-2 with VAR-3
$Y$ Scans from left to right for VAR-1 within VAR-2, if found
sets FOUND and replaces VAR-1 with VAR-3.
NOTE2 If keyword ALL present all occurances will be replaced.
NOTE3 The size or VAR-2 may be changed by this command, if its
declared size is reached without full replacement being
possible OVERFLOW will be set.
NOTE4 RESP indicates number of replacements.
NOTE5 VAR-3 may be {{NULL}}, this deletes VAR-1 from VAR-2.
NOTE6 VAR-1 may be same as VAR-3 to perform counting in RESP.
@end
@nf 28
@head centre,"The REVERSE command"
@ban
@border
PURPOSE This command is primarily for use with UK format dates in
the form:
dd/mm/yy to the form yy/mm/dd
The REVERSE command performs this reformatting by
swapping the first two characters with the last two
characters.
For US format dates we suggest use of SCAN and COMBINE
commands.
$X$ REVERSE variable
$Y$ The length of the datatype can be greater than 8
characters if desired. If it is less than 8
characters, no action is performed.
NOTE2 The effect of the command is ALWAYS to swap the
contents of Bytes 0/1 with Bytes 6/7.
@end
@nf 29
@head centre,"The SCAN command"
@ban
@border
PURPOSE Extracts fixed or variable length data from a var placing
it in other var(s). In order to extract variable length
data, the character used to delimit (separate) the data
must be specified. When extracting data into a variable,
the amount of data extracted may depend on the current
size of the variable.
$X$ SCAN list of vars
$Y$ In order to use this command, you must first of all
specify the data area you want to scan. This area is
nominated using the SETSCAN command.
NOTE2 The end of data extracted is determined either by the
current length of the datatype given or the location of a
termination character (delimiter). The delimiter is the
value of the system variable DELIM which has a default
value of COMMA.
NOTE3 In order to extract fixed length data items, you should
give the system variable DELIM a value of ZERO, i.e.
MOVE ZERO TO DELIM
@end
@nf 2a
@head centre,"The SETSCAN command"
@ban
@border
PURPOSE Nominates a var to be scanned using the SCAN command.
$X$ SETSCAN var {{start position}}
$Y$ You can supply an OPTIONAL starting offset within the
variable being scanned. This is a start position relative
to byte 0 of the datatype and must be the name of an
integer variable or an integer constant.
NOTE2 An error will be reported if you specify a starting byte
which is outside the bounds of the variable or item.
$V$ If a variable X is defined as:
VAR X,13,"The brown cow"
then the following commands extract "brown" into the
variable Y:
SETSCAN X 4
CLEAR DELIM
SCAN Y
@end
@nf 2b
@head centre,"The TRIM command"
@ban
@border
PURPOSE Trims trailing spaces from one or more vars.
$X$ TRIM var {{var ...}}
$Y$ This command is particularly useful for removing
trailing spaces from data which has been input to a
form and obtained via the GET command. Unprotected fields
declared in a form will usually be keyed into from left
to right. As is often the case, the amount of data
entered will be less than the maximum permitted and
during subsequent processing of the data, it may not
be desirable to perpetuate unwanted space characters.
NOTE2 The command will reset the current size of a var, if
trailing spaces exist.
NOTE3 If the var contains only spaces, trim will generate a
{{NULL}} variable.
@end
@nf 2c
@head centre,"The UPPER command"
@ban
@border
PURPOSE Forces characters to UPPER CASE.
$X$ UPPER var
@end
@nf m3
@head left,"Conversational-mode Commands"
$P$
@head centre,"Menu"
@ban
@border
@bbmenu white,red
{ASK }
{ASKLN }
{INKEY }
@col char,white,red
@win line2,column14,depth3,width60
Display a message - get user input (into VAR or LOGICAL)
As ASK but newline before prompt.
Raw data capture - Get a character - or test for one.
$A$
@end
@nf 31
@head centre,"The ASK command"
@ban
@border
PURPOSE Prompts the user with a question and obtains a reply.
The reply may be either a string of characters or a
YES/NO answer. The prompt character is a "greater than"
sign.
$X$ ASK var/logical standard_list_of_datatypes
$Y$ Carriage return actions this command.
NOTE2 Editing ASK command data:
CTRL/X may be used to cancel any data already entered.
Backspace and cursor left keys delete the last character
input.
NOTE3 Screen output is directed through the VT52 driver, i.e.
like the DISPLAY command.
$V$ VAR FILE,14
ASKLN FILE "Which file would you like to edit ?"
RUN "WS " FILE
@end
@nf 32
@head centre,"The ASKLN command"
@ban
@border
PURPOSE As for the ASK command, but displays the prompt
character ">" in column 0 of the next line following the
standard list of datatypes.
NOTE Screen output is directed via MS-DOS, i.e. like the
DISPLAYLN command.
@end
@nf 33
@head centre,"The INKEY command"
@ban
@border
PURPOSE Obtains a keyboard character and stores it in a var or
table-of-var, with default lower case to upper case
character conversion.
$X$ INKEY {{var or table-of-var entry}} {{CASE}}
$Y$ The optional keyword CASE should be included only if
you do not want lower case characters to be converted.
NOTE2 The command causes Taskmaster to be suspended until a key
is depressed - but See Note 3.
NOTE3 If no variable or table name is given then INKEY polls
the keyboard for a character. If a character is not
available then the command has no effect and the system
logical variable KEY is set to FALSE.
If a key has been pressed however, the system variable
KEYVAL will be set to the value of the key pressed and
the system logical variable KEY will be set to TRUE.
This is useful to enable break-in during repetitive
screen displays, or flush the keyboard buffer.
@end
@nf m4
@head left,"Video handling commands"
$P$
@head centre,"Menu"
@ban
@border
@bbmenu white,red
{BACK }
{CURSOR }
{DISPLAY }
{DISPLAYLN}
{DRAW }
{FORE }
{LOCATE }
{POPDOWN }
{POPFREE }
{POPGET }
{POPUP }
{SCANVID }
{SCREEN }
{SWITCH }
{USERLINE }
@col char,white,blue
(See the SWITCH command for notes on POPSCREEN)
@col char,white,red
@win line2,column14,depth15,width60
For selecting background colour
Position cursor and display message
Display data or text
Display text then newline - Store in DISPLAY sysvar
Draws a line graphic shape
Selects foreground colour by number
Returns position of cursor into 2 INTegers
Restores data beneath pop-up
Frees memory used by POPUP, returns it to the POPUP pool
Stores screen area defined in last @WINDOW in POPUP pool
Overlays part of screen from VARiable table
Returns a line from the screen
Directs data to specific screen
Selects the screen page
Writes to line 25 of video
$A$
@end
@nf 41
$P$
@head centre,"The BACK command"
@ban
@border
The BACK command sets the
background colour and foreground
flashing attribute. Please refer
also to the section on the
complementary FORE command.
$X$
BACK attribute
@GON
@win line2,column44,depth20,width31
7----8------------------------9
0 0 foreground background 0
4----5------------------------6
0 0 0 Steady Black 0
0 1 0 Steady Blue 0
0 2 0 Steady Green 0
0 3 0 Steady Cyan 0
0 4 0 Steady Red 0
0 5 0 Steady Magenta 0
0 6 0 Steady Brown 0
0 7 0 Steady White 0
0 8 0 Flashing Black 0
0 9 0 Flashing Blue 0
0 10 0 Flashing Green 0
0 11 0 Flashing Cyan 0
0 12 0 Flashing Red 0
0 13 0 Flashing Magenta 0
0 14 0 Flashing Brown 0
0 15 0 Flashing White 0
1----2------------------------3
@end
@nf 42
@head centre,"The CURSOR command"
@ban
@border
PURPOSE Positions the cursor according to supplied screen co-
ordinates and optionally displays data at that position.
$X$ CURSOR Line Column {{standard_list_of_datatypes}}
EXAMPLE CURSOR 10 20 "Invalid option " OPTION
@end
@nf 43
@head centre,"The DISPLAY command"
@ban
@border
PUROSE To send data to the video via the VT52 interface and/or
to change the attributes of the screen.
$X$ DISPLAY standard_list_of_datatypes
$Y$ This command is intended primarily to be used when it is
required to send character control sequences to the video,
for example, to clear to end of line, clear the
screen etc.
NOTE2 DISPLAY commands differ from DISPLAYLN commands in that
the output is directed through the VT52 interface. Thus
prevailing screen attributes such as colour will apply.
The best way to drive the video for all but the most
unconventional requirements is to DISPLAY video
constants - refer to the VCONST command for more
information.
@end
@nf 44
@head centre,"The DISPLAYLN command"
@ban
@border
PURPOSE Displays data on the video, and moves the cursor to the
first character position on the next line.
$X$ DISPLAYLN standard_list_of_datatypes
$Y$ A new-line can be displayed using:
DISPLAYLN 1 i.e. Display one space
NOTE2 Output from this command is channelled through MS-DOS
and therefore it will be displayed in the MS-DOS default
colour.
NOTE3 The system variable DISPLAY will contain the contents of
the line displayed. This is very useful if you want to
save the displays to a file.
@end
@nf 45
@head centre,"The DRAW command"
@ban
@border
PURPOSE Draws a horizontal/vertical line or rectangle in
the prevailing foreground colour. The drawing can be done
using either single-line or double-line graphics according
to the currently selected line graphics mode.
$X$ DRAW line-1 column-1 line-2 column-2
where :
(line-1,column-1) and (line-2,column-2) are pairs of
integer variables or constants that define the start
and finish screen co-ordinates.
$N$ Single/double line mode should be selected before using
the DRAW command by using the DISPLAY command (Not
DISPLAYLN) to send the appropriate video constants (85
and 86). Use FORE and BACK commands to control colour.
@end
@nf 46
$P$
@head centre,"The FORE command"
@ban
@border
PURPOSE FORE command sets the foreground colour only. Please
refer also to the section on the complementary BACK
command.
$X$ FORE attribute
@win line5,column51,depth18,width22
@gon
7----8---------------9
0 0 0 0
0 1 0 0
0 2 0 0
0 3 0 0
0 4 0 0
0 5 0 0
0 6 0 0
0 7 0 0
0 8 0 0
0 9 0 0
0 10 0 0
0 11 0 0
0 12 0 0
0 13 0 0
0 14 0 0
0 15 0 0
1----2---------------3
@win line6,column58,depth1,width1
@dim
Black
Blue
Green
Cyan
Red
Magenta
Brown
White
@bright
Dark Grey
light Blue
light Green
light Cyan
light Red
light Magenta
Yellow
Bright white
@end
@nf 47
@head centre,"The LOCATE command"
@ban
@border
PURPOSE Used to return the current position of the cursor, i.e.
line and column as integers. This may be required for a
variety of purposes including keeping track of MS-DOS
cursor movement.
$X$ LOCATE line column
where line and column are integer variables.
$Y$ The values returned may be used in a subsequent CURSOR
command.
NOTE2 This command always returns the correct co-ordinates
irrespective of which component is driving the screen,
i.e. MS-DOS or the Taskmaster VT52 interface.
@end
@nf 48
@head centre,"The POPDOWN command"
@ban
@border
PURPOSE To restore the contents of the screen as previous to the
use of the POPUP command. Does not return the memory used
by the POPUP command.
$X$ POPDOWN identifier
$Y$ The supplied identifier must contain a value returned by a
previous POPUP or POPGET command - it need not be the
same integer variable but its value must conform to
that of a valid identifier.
NOTE2 If the identifier given corresponds to one obtained by the
POPGET command then the window will be restored in its
original position.
NOTE3 POPDOWN may be used repeatedly for a given identifier.
Identifiers remain valid until a POPFREE command is
executed referencing them.
NOTE4 See the POPUP command for further details and examples.
@end
@nf 49
@head centre,"The POPFREE command"
@ban
@border
PURPOSE The POPFREE command simply returns memory allocated to a
POPUP identifier back to the POPUP pool for re-use.
$X$ POPFREE identifier
$N$ Refer to the NOTES section of the POPUP command.
@end
@nf 4a
@head centre,"The POPGET command"
@ban
@border
PURPOSE The function of the POPGET command is to save the area
defined in the last @window directive into the POPUP pool
and return an identifier to it. A PUT or MENU command
must have been executed prior to this command referencing
a template containing a window.
$X$ POPGET identifier
$Y$ Once the POPGET command has sucessfully executed the
screen area can easily (and instantly) be restored by
means of a POPUP command.
NOTE2 It is customary to execute POPGET commands during task
initialisation.
NOTE3 The location, colour and contents of the screen area need
not be specified in POPUP commands referencing identifiers
obtained with POPGET as this information is implicitly
defined in the screen template.
NOTE4 Users are advised to create frequently used popups before
transient ones. This minimises the chances of fragmenting
the popup memory pool.
NOTE5 See STANDARD for examples of use
@end
@nf 4b
@head centre,"The POPUP command"
@ban
@border
PURPOSE To 'popup' a text window in specified foreground and
background colours at a desired screen location, saving
the current screen contents for a subsequent restore using
the POPDOWN command.
$X$ POPUP identifier table_of_var foreground background
SYNTAX2 POPUP id1 FROM id2
$Y$ This command returns a response in the first parameter
identifier which must be an integer variable. A non-zero
value in the identifier indicates that a popup buffer was
successfully allocated. A zero value indicates that no
memory was available.
NOTE2 Current cursor position will be top left corner of popup.
NOTE3 See FORE and BACK for values of foreground and background
parameters.
NOTE4 After executing this command, your task should eventually
perform a POPFREE command.
NOTE5 Variant 2 displays popup id2 after storing screen contents
and returning id1.
@end
@nf 4c
@head centre,"The SCANVID command"
@ban
@border
PURPOSE To extract data from screen memory. The screen may be any
valid screen, i.e. the current active screen or an
inactive screen. The command extracts the data from a
nominated line number.
$X$ SCANVID line-number GIVING variable
$Y$ The SCANVID command reads n characters starting from
column 0 of a specified line. The number of characters n
is determined by the current size of the receiving var.
NOTE2 Only the ASCII values of screen locations are returned,
i.e. attributes are not returned.
NOTE3 You may use the SCAN command on the receiving datatype
without issuing a preparatory SETSCAN command.
$V$ To read lines 2 to 11:
var video,2000
sizevar video 800
scanvid 2 giving video
@end
@nf 4d
@head centre,"The SCREEN command"
@ban
@border
PURPOSE Changes the current display page of the video. All
subsequent VT52 video commands will have their output
directed to the selected page. The number of available
display pages depends upon the type of video adaptor
fitted.
$X$ SCREEN page-number
$Y$ The page-number given is not checked as being the number
of a physically available display page and only pages 0-3
will be allowed in any event.
NOTE2 The command does not affect the active page, i.e. the page
currently displayed.
NOTE3 This command is normally used to enable the contents of
additional screens to be built-up transparently and then
to display them using the SWITCH command.
@end
@nf 4e
@head centre,"The SWITCH command"
@ban
@border
PURPOSE Changes the currently active display page of the video.
This causes the selected page to be displayed.
$X$ SWITCH page-number
$Y$ The page-number given is not checked as being the number
of a physically available display page and only pages 0-3
will be allowed in any event.
NOTE2 Refer to the example given for the SCREEN command to see
how the SWITCH command may be used.
NOTE3 The number of available display pages depends upon the
type of video adaptor fitted.
NOTE4 The POPSCREEN command may be used in lieu of SCREEN and
SWITCH commands especially on mono videos with one page.
See the OVERVIEW and STANDARD tasks for examples of use.
@end
@nf 4f
@head centre,"The USERLINE command"
@ban
@border
PURPOSE FmP PROTEAN based products make extensive use of the
video USERLINE (line 25 of the screen). Many user-
written Taskmaster applications also wish to make use
of this facility.
The command allows you to easily display data on the
userline, independendent of the rest of the screen and
retaining the cursor position.
$X$ USERLINE standard_list_of_datatypes
$Y$ The USERLINE command ensures that the length of the
displayed data is 80 characters or less.
NOTE2 Userline output assumes the current screen attributes set
by any previous commands that used the VT52 interface,
i.e. colour, intensity, flashing etc.
NOTE3 See the SCR @USERLINE directive.
@end
@nf m5
@head left,"External program control"
$P$
@head centre,"Menu"
@ban
@border
@bbmenu white,red
{BEHAVE }
{LARGE }
{RUN }
@col char,white,blue
(See also the DATA command on the Operating Environment menu)
@col char,white,red
@win line2,column14,depth3,width60
Selects I/O environment
Runs large applications (Taskmaster shrinks to 1k)
Invoke MS-DOS programs
$A$
@end
@nf 51
@head centre,"The BEHAVE command"
@ban
@border
PURPOSE Applications programs are classified as having the
following types of behaviour:
TYPE1 Well behaved, i.e. uses standard MS-DOS
functions to obtain keyboard input and hence
permits the use of standard re-direction
facilities.
TYPE2 Ill behaved, i.e. uses the ROM BIOS interrupt 16
to obtain keyboard data.
$X$ BEHAVE CLASS {{wait NACKS}}
where CLASS is an integer value 0, 1, 2 or 3.
$Y$ The wait clause is only available for class 2. If used,
the next program will be told there is no data available
the first 'NACKS' times it checks keyboard status.
NOTE2 BEHAVE 1 and 2 create a file called REDIRECT.PRO. This is
used to store data in subsequent DATA commands.
NOTE3 BEHAVE 0 has the effect of cancelling any data stored.
If it follows behave 1 or 2; REDIRECT.PRO is closed and
may be used for other purposes.
NOTE4 BEHAVE 3 is like BEHAVE 1 except you may nominate a file
name as a parameter. See PRINTMAN.TSK.
@end
@nf 52
@head centre,"The LARGE command"
@ban
@border
PURPOSE Enables large MS-DOS programs to be executed. The command
is otherwise identical to the RUN command and should only
be employed when difficulty in loading a program is
experienced due to lack of available memory.
$X$ LARGE list-of-datatypes
$Y$ The command operates by causing areas of code and data to
be paged-out of memory leaving a nominal 2K of code
behind. This enables virtually any program to be run
beneath Taskmaster.
NOTE2 The message "Large program loading.. please wait" is
displayed when the LARGE command executes.
NOTE3 Paged-out memory is written to a temporary swap file
called C:\TMnnnnn.OVL where nnnnn is a unique number. If
drive C does not exist, or you would prefer the file to be
created somewhere other than the root directory, you
should define this by adding the following line to
AUTOEXEC.BAT: SET TMP=PATH
E.g. SET TMP=A:\WORKDIR
@end
@nf 53
@head centre,"The RUN command"
@ban
@border
PURPOSE Invokes an MS-DOS command, program or batch file.
$X$ RUN standard_list_of_datatypes
$Y$ Uses COMMAND.COM (or if the Environment Variable COMSPEC
is set it uses the command processor defined therein). If
it fails to load this utility a message may be output
and RESP indicates the reason. See system variable RESP.
NOTE2 The MS-DOS ERRORLEVEL parameter value is returned in the
integer variable ELEVEL.
NOTE3 See the LARGE command if you experience difficulty loading
large applications.
NOTE4 If you would like to pass data to the application after it
has been loaded see the BEHAVE and DATA commands.
NOTE5 Command line parameters and flags may be supplied as well
as the name of the application.
@end
@nf m6
@head left,"EUC interface commands"
$P$
@head centre,"Menu"
@ban
@border
@bbmenu white,red
{CATALOG }
{LOGIN }
{LOGOUT }
{PASSWORD }
@col char,white,red
@win line2,column14,depth4,width60
Opens the EUC Catalogue
VALIDATE EUC username and password
EUC catalogue exit
EUC edit password in catalogue
$A$
@end
@nf 61
@head centre,"The CATALOG command"
@ban
@border
PURPOSE The CATALOG command opens a catalogue containing a list of
current authorised users in order to allow the
verification of passwords when a user "logs in". You are
responsible for processing login requests in your task by
invoking the LOGIN command.
End-users may NOT create usernames but they can change
their password provided you have chosen to support this
facility in the task by using the PASSWORD command.
$X$ CATALOG drive-letter
where drive-letter is in the range A-P and may be any of :
a string, e.g. F:\DEV
a literal,e.g. "B:\PROGS"
a variable
@end
@nf 62
@head centre,"The LOGIN command"
@ban
@border
PURPOSE If the login is successful, the date/time and other
details are recorded in the catalogue.
The login remains in force until either a LOGOUT or STOP
command is obeyed.
$X$ LOGIN user_name password user_group
where user_name and password are variables and user_group
is an integer variable (to return a value).
$Y$ The catalogue must be open when this command is issued.
See the CATALOG command.
NOTE2 The user_name and password must be variables with a
maximum current size of 16 characters.
NOTE3 If the user_name does not exist, the system integer RESP
will return the value 1. If the user_name exists but the
password is invalid, RESP will return the value 2.
@end
@nf 63
@head centre,"The LOGOUT command"
@ban
@border
PURPOSE The LOGOUT command should be invoked whenever a user has
finished using the TASKMASTER system. The date and time
logged off are recorded in the catalogue.
$X$ LOGOUT
$N$ A user must be "logged-out" before a new user can be
"logged-in" using the LOGIN command.
@end
@nf 64
@head centre,"The PASSWORD command"
@ban
@border
PURPOSE Allows a "logged-in" user to change their current
password.
$X$ PASSWORD new_password
where new_password is a variable
$Y$ The current size of the variable must not be greater than
16 characters.
NOTE2 Any characters may be used and lower case alphabetics will
not be converted to upper case.
NOTE3 This command may only be issued if :
a) A CATALOG command has been issued previously.
b) A valid LOGIN has been performed.
NOTE4 The EUC utility also allows passwords to be assigned or
changed by the authorised system administrator.
Normally, an initial password would be assigned when the
user_name is first introduced into the catalogue using the
EUC utility.
@end
@nf m7
$P$
@head left,"Data definition commands"
@head centre,"Menu"
@ban
@border
@bbmenu white,red
{DEFINE }
{END }
{HEXVAR }
{INT }
{LOGICAL }
{VAR }
{VCONST }
@col char,white,red
@win line2,column14,depth7,width60
Defines/initialises an integer
End of data declarations
Hexadecimal variable - VAR with value specified in HEX
Integer variable - can be 0-65535
Logical variable - can be TRUE or FALSE
A byte variable - may also be used for tables
A video constant - portable video function
$A$
@end
@nf 71
@head centre,"The DEFINE command"
@ban
@border
PURPOSE Defines frequently used constants that may be referred to
by name. Use it to define error codes, responses etc.
$X$ DEFINE name,integer_constant
$Y$ An integer-constant if specified must be in the range 0-
65535.
NOTE2 The variable so defined may be used in any context that an
integer variable could be used.
NOTE3 No check is made to prevent you from assigning a new
value to the name, but this is not recommended - use an
integer variable instead.
@end
@nf 72
@head centre,"The END command"
@ban
@border
PURPOSE Defines the end of data declarations.
$X$ END
@end
@nf 73
@head centre,"The HEXVAR command"
@ban
@border
PURPOSE Declares a variable by specifying it as hexadecimal
characters.
$X$ HEXVAR name-of-variable, hexadecimal string
$Y$ A hexadecimal string is defined as a string of
hexadecimal digits in the range 0-9, A-F.
Hex digits should be specified in pairs. Each pair will
be converted and held as a character within the
variable.
NOTE2 Hexadecimal variables may be used in any context where an
ordinary variable might be used.
NOTE3 Hexadecimal variables are not to be confused with
hexadecimal constants which are integers.
@end
@nf 74
@head centre,"The INT command"
@ban
@border
PURPOSE Declares one or more int-vars. An int-var is a user-
defined area of available memory which may be used to
hold a signed integer value in the range -32768 to 32767
inclusive OR an unsigned value in the range 0 to 65535.
$X$ INT variable_name{{,variable_name ...}}
$N$ The initial value of declared variables is ZERO. If you
wish to assign an alternative initial value, use the
DEFINE command.
@end
@nf 75
@head centre,"The LOGICAL command"
@ban
@border
PURPOSE Declares one or more logical variables. A logical
variable is a user-defined area of memory which may be
assigned the values TRUE or FALSE.
$X$ LOGICAL name{{,name ...}}
$Y$ The initial value of declared variables is FALSE.
NOTE2 Logical variables should be used wherever they will
improve the readability of the task.
NOTE3 Logical variables may also be used for remembering the
previous state of a logical system variable.
For example, if you have used a FIND command which sets
the system variable FOUND to either TRUE or FALSE, and
you wish to perform a further FIND command without
losing the result of the first FIND, you can save the
value of FOUND in a logical variable which you have
declared.
@end
@nf 76
@head centre,"The VAR command"
@ban
@border
PURPOSE Declares a user-defined area of available memory to
contain a string of bytes or a table of strings.
$X$ VAR NAME,size {{,optional_literal_value}}
{{,OCCURS n}}
{{,OCCURS n}}{{,optional_literal_value}}
Using this syntax the size of the literal is limited by
the allowable length for a command (160 characters). The
alternative syntax:
SYNTAX2 VAR name,size {{,OCCURS n }} {{,
literal
literal
literal
....}}
enables more data to be assigned if required.
@end
@nf 77
@head centre,"The VCONST command"
@ban
@border
PURPOSE Declares a video constant. You may need to use video
control sequences which are already known to Taskmaster.
An example is the CLEAR SCREEN function.
$X$ VCONST sequence_name,number_in_sequence_table
$Z$
@gon
VCONST variables are read in 7----8--------------------------9
from the FmP supplied file 0 11 0 Clear-screen 0
FMPVT52.DEF. 0 46 0 set STEADY attribute 0
0 47 0 set FLASHING attribute 0
The MOVE command allows VCONST 0 48 0 Exit reverse video mode 0
variables on the left hand side of 0 55 0 Clear to end of line 0
the expression. 0 56 0 Clear to end of screen 0
0 74 0 Enable cursor 0
VCONST variables can be used in any 0 75 0 Disable cursor 0
command where a standard_list_of 0 78 0 Enter reverse video mode 0
_datatypes is permitted. 0 85 0 Select Single graphics 0
0 86 0 Select Double graphics 0
1----2--------------------------3
@end
@nf m8
@head left,"Data initialisation commands"
$P$
@head centre,"Menu"
@ban
@border
@bbmenu white,red
{CLEAR }
{SIZEVAR }
@col char,white,red
@win line2,column14,depth2,width60
Reset one or more VARs to spaces, INTs to 0 etc.
Specify new effective size of VAR
$A$
@end
@nf 81
@head centre,"The CLEAR command"
@ban
@border
PURPOSE Initialises a list of datatypes. This command is ALWAYS
faster in execution than its equivalent MOVE command.
Because a list of datatypes can be supplied, this leads
to more efficient tasks, i.e. one CLEAR can be equivalent
to a list of MOVE commands.
$X$ CLEAR list_of_datatypes
$N$ Allowable datatypes and the effect of this command on them
are as follows:
@gon
7---------------------------8-------------------9
0 Datatype 0 Cleared to 0
4---------------------------5-------------------6
0 INT var 0 0 0
0 LOGICAL 0 FALSE 0
0 VAR 0 spaces 0
0 table of VAR 0 spaces 0
1---------------------------2-------------------3
Variables are reset to their declared (maximum) size.
@end
@nf 82
@head centre,"The SIZEVAR command"
@ban
@border
PURPOSE Sets or alters the current size of a var. The size of a
var can be anywhere between zero (a NULL variable) and
the declared (maximum) size.
$X$ SIZEVAR VAR INT
@draw
$Z$ >1<
Remember that variables have a var filename,10,"FRED.DAT"
declared (maximum) size and sizevar filename 4
current size. By default the displayln filename
current size is zero (and the sizevar filename 6
variable contains spaces) displayln filename
unless data has been assigned >1<
to the variable in its
definition. >2<
FRED
The use of sizevar doesn't FRED.D
affect the contents of a >2<
variable.
@end
@nf m9
@head left,"Task flow control commands"
$P$
@head centre,"Menu"
@ban
@border
@bbmenu white,red
{ELSE }
{ENDTASK }
{FI }
{GOTO }
{IF }
{STOP }
{WAIT }
{WHILE }
{UNTIL }
@col char,white,red
@win line2,column14,depth9,width60
Used in IF - ELSE - FI construction
End of task declaration - cease interpretation
Terminates ELSE, IF, WHILE or UNTIL CODE-BLOCK
Jump to label
Evaluate expression - if FALSE skip to ELSE or FI
Task termination - return to Operating System
Display a message and Wait for a key depression
Evaluate expression in loop - when FALSE skip to FI
Evaluate expression in loop - when TRUE skip to FI
$A$
@end
@nf 91
@head centre,"The ELSE command"
@ban
@border
PURPOSE Causes an alternative {{CODE-BLOCK}} to be obeyed, when
the result of an IF command evaluates to FALSE.
NOTE1 The {{CODE_BLOCK}} following ELSE must be terminated
by a FI command.
NOTE2 Further {{CODE_BLOCK}}s may be nested within the ELSE
{{CODE_BLOCK}}.
NOTE3 The ELSE command may only be used to terminate
{{CODE_BLOCK}}s prefixed by the IF command.
$V$ IF NAME CONTAINS "SMITH"
INCREMENT SMITHS
IF SMITHS > 100
DISPLAYLN "Too many SMITHS"
ELSE
DISPLAYLN SMITHS " SMITHS found"
FI
ELSE
INCREMENT OTHER_NAMES
FI
@end
@nf 92
@head centre,"The ENDTASK command"
@ban
@border
PURPOSE ENDTASK should be the last command in a task.
$X$ ENDTASK
$N$ Scr source data relating to the task may optionally be
placed at the end of the task, i.e. the .TSK file. This
is possible because Scr, the screen processing program
ignores all data preceding the @VIDEO directive.
It is wise to include the ENDTASK command so that
Taskmaster cannot accidentally attempt to interpret SCR
commands as Taskmaster commands.
@end
@nf 93
@head centre,"The FI command"
@ban
@border
PURPOSE Terminates a {{CODE-BLOCK}} which follows any of the
following commands:
IF ELSE UNTIL WHILE
$X$ FI {{integer_variable}}
$Y$ Within a task, there MUST be a matching FI command for
each IF, UNTIL and WHILE command.
NOTE2 For ease of readability, it is normal to indent FI to
the same extent as its matching IF, UNTIL or WHILE
command. This approach is also likely to minimise the
risk of producing a block structure with unterminated
blocks.
NOTE3 If you wish to increment a counter at the end of an UNTIL
or WHILE {{CODE-BLOCK}}, this may be achieved by naming
the integer variable as a parameter to the matching FI
command.
@end
@nf 94
@head centre,"The GOTO/GOBACK commands"
@ban
@border
PURPOSE Forces a jump to a label.
$X$ GOTO string {{,variable}}
SYNTAX2 GOTO variable
SYNTAX3 GOTO string
$Y$ The location jumped to must be a label at the current
block level.
NOTE2 Labels must be UPPERCASE and start with a numeric in
column 0.
NOTE3 The GOTO command searches forward from current position in
the source to end of file and then starts from the
beginning again giving up when it reaches the GOTO command
line. You may use GOBACK for improved performance if you
know the label precedes the command. GOBACK always starts
searching from the beginning of the file.
@end
@nf 95
@head centre,"The IF command"
@ban
@border
PURPOSE Evaluates an expression to either TRUE or FALSE. If TRUE,
the following {{CODE-BLOCK}} is performed. If FALSE, all
commands upto the next ELSE or FI command are ignored.
$X$ IF expression {{AND/OR expression ...}}
{{CODE-BLOCK}}
FI
SYNTAX2 IF expression {{ AND/OR expression ...}}
{{CODE-BLOCK-1}}
ELSE
{{CODE-BLOCK-2}}
FI
$Y$ Note that {{CODE-BLOCK-1}} can be an empty block. This is
an often used technique to reverse a condition.
NOTE2 Syntax for expression is covered at length in the printed
manual.
@end
@nf 96
@head centre,"The STOP command"
@ban
@border
PURPOSE Closes all files and relinquishes all resources before
returning to the calling process.
$X$ STOP {{n}}
where n is an integer in the range 1-255 used to return an
ERRORLEVEL parameter when invoked from a shell.
@end
@nf 97
@head centre,"The WAIT command"
@ban
@border
PURPOSE Suspends execution of a task for a pre-determined period
or until a key is pressed.
$X$ WAIT {{literal or var}}
SYNTAX2 WAIT int-constant or int-var
$Y$ If no datatype is specified following WAIT, Taskmaster
will output the message:
"Waiting - press any key to continue"
and wait indefinitely until the user presses a key. If
WAIT is followed by a literal or variable, this will
be displayed instead of the default message.
NOTE2 If WAIT is followed by an integer, its value will be
taken as the number of delay periods to wait, after which
the task will resume at the next command. In this case,
the value must be in the range 1-1000. See DELAY.
NOTE3 The key pressed causing a breaking is made available in
KEYVAL system variable, when KEY is also set.
@end
@nf 98
@head centre,"The WHILE command"
@ban
@border
PURPOSE Repeatedly executes a {{CODE-BLOCK}} while a condition
evaluates to TRUE.
$X$ See the IF command.
$Y$ The condition is always examined at the start of the loop.
NOTE2 There must be a matching FI command at the end of the
{{CODE-BLOCK}} being repeated.
@end
@nf 99
@head centre,"The UNTIL command"
@ban
@border
PURPOSE Repeatedly executes a {{CODE_BLOCK}} until a condition
evaluates to TRUE.
$X$ See the IF command.
$Y$ The UNTIL command must be followed by a {{CODE-
BLOCK}} terminated by a FI command.
NOTE2 Other UNTIL commands may be embedded within the {{CODE-
block}}.
NOTE3 The command is intended for creating efficient block-
structured code in preference to using the GOTO command.
NOTE4 Loop count incrementation for the UNTIL command can be
handled by the optional parameter to the matching FI.
@end
@nf ma
$P$
@head left,"Operating Environment commands"
@head centre,"Menu"
@ban
@border
@bbmenu white,red
{COMPAT }
{DATA }
{DISABLE }
{ENABLE }
{PRINTER }
{SELECT }
{STRATEGY }
@col char,white,red
@win line2,column14,depth7,width60
MS-DOS facilities reporting
Passing data to programs
Environment control
Environment control
Gets the status of a printer
Selects the default drive
Controls memory allocation
$A$
@end
@nf a1
@head centre,"The COMPAT command"
@ban
@border
PURPOSE Informs Taskmaster about the compatibility level of the
machine with respect to the IBM PC family.
$X$ COMPAT flags
where flags is an integer constant or variable which is
regarded as a 16-bit data area where bit significance is:
Bit Default Use
0 on Set if machine has an IBM ROM BIOS data
area located at address 0000:0400h.
1 on Set if machine has an IBM compatible ROM
BIOS.
2 on Set if Taskmaster is required to run under
WINDOWS.
3 off Set if required to run Taskmaster under PC-
MODE in a CDOS regime.
4-15 off reserved
The default value is 7.
@end
@nf a2
@head centre,"The DATA command"
@ban
@border
PURPOSE To supply data to the next program loaded and run via
the RUN (or LARGE) command. This command emulates input
from the keyboard.
$X$ DATA standard_list_of_datatypes
$Y$ The amount of data which may be supplied in advance
may be upto 512 bytes or unlimited depending on the
current setting of the BEHAVE command.
NOTE2 STRINGS are allowed in the list_of_datatypes which must be
space separated.
NOTE3 Note that not all programs allow data to be available in
advance.
NOTE4 The method for passing data to programs is proprietary and
compatible with all machines having an IBM compatible ROM
BIOS.
NOTE5 You can use a notation ^X to denote CTRL/X where X is the
required control code. You can, of course, use a HEXVAR
to achieve the same result.
@end
@nf a3
@head centre,"The DISABLE command"
@ban
@border
PURPOSE This command is especially useful if you want to create
a very secure environment which prevents "end-users"
from escaping to the system, i.e. to the MS-DOS prompt
other than by the method you have dictated.
$X$ DISABLE CTRL_C
SYNTAX2 DISABLE SHELLING
$Y$ By default CTRL_C is disabled and SHELLING is enabled.
NOTE2 CTRL_C relates to the Operating System feature whereby
you can prematurely breakin to Taskmaster by pressing
CTRL/C or CTRL/break and return to the MS-DOS prompt. This
prevents the end-user from interrupting task execution.
NOTE3 SHELLING relates to the ability of programs RUN beneath
Taskmaster to load further applications.
IMPORTANT CTRL/C is always enabled when another program is loaded
from Taskmaster to allow "normal" operation of such
programs.
@end
@nf a4
@head centre,"The ENABLE command"
@ban
@border
PURPOSE CTRL_C enables (allows) users to break-in to Taskmaster
using CTRL/C. SHELLING allows programs loaded by
Taskmaster to load further programs. See DISABLE.
$X$ ENABLE CTRL_C
SYNTAX2 ENABLE SHELLING
$N$ By default the CTRL_C feature is disabled and the SHELLING
feature is enabled.
@end
@nf a5
@head centre,"The PRINTER command"
@ban
@border
PURPOSE To determine the current status of one of the serial or
parallel printers before use.
$X$ PRINTER name
where name is one of the parallel printer mnemnonics
LPT1, LPT2 or LPT3
or serial port mnemonics
COM1, COM2
or the defaults
PRN and AUX
$N$ On completion of this command, the system integer
variable RESP will contain either :
0 device available
or 255 device unavailable.
@end
@nf a6
@head centre,"The SELECT command"
@ban
@border
PURPOSE This command enables you to nominate the default drive.
$X$ SELECT drive
where drive is a letter in the range A-P and may be
specified as:
1. a string, e.g. C
2. a literal, e.g. "B"
3. a variable
$Y$ The system variable RESP is updated by this command and is
set to zero if the drive has been successfully selected.
NOTE2 The system variable DDRIVE will be updated when this
command is successful.
NOTE3 The command should be used particularly after loading a
diskette to ensure that the diskette directory is current.
@end
@nf a7
@head centre,"The STRATEGY command"
@ban
@border
PURPOSE Changes the strategy used by MS-DOS when allocating memory
blocks. The strategy may need to be changed if failure to
utilise memory efficiently is experienced, e.g. failure to
load additional programs in shell environments.
$X$ STRATEGY int CODE
where CODE is an integer constant or variable with
a value in the range 0-2.
$Y$ The following strategies are available -
0 = First fit. MS-DOS will look for available
memory blocks starting at the bottom of RAM and
allocate the first one it finds which satisfies
the request.
1 = Best fit. MS-DOS searches all available memory
looking for the smallest block that will satisfy
the request.
2 = Last fit. MS-DOS looks for available memory
blocks starting at the top of RAM.
NOTE2 The default strategy is 0.
NOTE3 If you change the strategy, the new strategy will remain
in force until a reboot or a further change.
@end
@nf mb
@head left,"Form and menu commands"
$P$
@head centre,"Menu"
@ban
@border
@bbmenu white,red
{ENDM }
{EXITM }
{FIELDFILL}
{FORMS }
{GET }
{INSERT }
{MENU }
{OPTION }
{PUT }
{RETURN }
@col char,white,red
@win line2,column14,depth10,width60
End of menu declaration
Find the ENDM command for current menu
Fills unprotected form fields
Open a nominated SCR forms file
Data capture from forms
Variable text in forms
Display a conventional of Bounce-bar Menu
Block start for menu option
Displays forms or bounce-bar menus
Redisplay current or previous Menu
$A$
@end
@nf b1
@head centre,"The ENDM command"
@ban
@border
PURPOSE Specifies the physical end of a menu. The LOGICAL end of
the menu is determined by a RETURN or EXITM command.
It must be present whenever the EXITM command is used to
cause an exit from a menu option command sequence, since
EXITM causes a search for the ENDM command.
If the time-out facility is being used the ENDM command is
also mandatory. It is not otherwise required.
$X$ ENDM menu-number
$Y$ The menu-number must correspond with the one defined in
the respective MENU command.
@end
@nf b2
@head centre,"The EXITM command"
@ban
@border
PURPOSE Causes an exit from the current menu to the command
following the ENDM command for the menu.
$X$ EXITM
$Y$ When creating a menu it is normal to arrange for one of
the menu options to cause an exit from the menu.
This exit may be to either a higher level menu (using the
return command) or to a sequence of commands not
associated with the menu, for example, the end of a task.
NOTE2 The exitm command is not mandatory. You can exit menus
by executing EXITM, RETURN n (if there is a previous
menu) or STOP.
@end
@nf b3
@head centre,"The FIELDFILL command"
@ban
@border
PURPOSE Places the contents of variables into the next screen
template that is displayed with a PUT command.
$X$ FIELDFILL list_of_variables
$Y$ The variables should be presented in the same order as
the fields appear in the form.
NOTE2 If the variables supplied are too large to fit in the
available fields they will be truncated.
NOTE3 The number of datatypes should not exceed the number of
fields in the form (maximum is therefore 20).
NOTE4 If FIELDFILL is not used the data within the fields will
be that present in the screen source file.
@end
@nf b4
@head centre,"The FORMS command"
@ban
@border
PURPOSE Opens a file created by Scr containing templates relating
to the present task.
$X$ FORMS forms_file_name
where forms_file_name is a string, literal or var.
$Y$ The forms file is created by Scr and has a default
filetype of OVR, which should be specified as part of
the filename.
NOTE2 The act of opening a new forms file will automatically
close the currently opened file as required.
NOTE3 It is used in conjunction with the PUT and MENU commands,
which it must logically precede.
NOTE4 The FORMS command reports the version number of the copy
of Scr that was used to create the OVR file in the RESP
system variable; e.g. V4.30 is returned as 430.
@end
@nf b5
@head centre,"The GET command"
@ban
@border
PURPOSE Obtains the contents of one or more fields from a form
presented to the user by a PUT command, when the RETURN
key is pressed and all data entered is valid according to
rules implicit on the type of field(s).
$X$ GET list_of_vars_and/or_logicals
$Y$ If validation checks fail then offending fields will be
shown on the screen with flashing opening feet.
NOTE2 The GET command need not be issued immediately after
its corresponding PUT command. It may be in a loop.
NOTE3 Function Keys offer an alternative exit for forms and may
detected using the ANYFK and FUNKEY system variables.
NOTE4 Any data contained within the field in the form source
file will be treated as default data when the FORM is
displayed.
@end
@nf b6
@head centre,"The INSERT command"
@ban
@border
PURPOSE Before displaying a form from the FORMS file, this
command may be used to insert text into the form at
predetermined positions (denoted by curly braces) in the
forms file source.
It is particularly useful for displaying constantly
changing information such as totals, counts etc. each time
a form is displayed.
For a MENU, the INSERT command need not be used since the
MENU command allows an optional list of insertion
datatypes.
$X$ INSERT list_of_variables
@end
@nf b7
@head centre,"The MENU command"
@ban
@border
PURPOSE The MENU may be of three types:
Conventional: This consists of a list of topics from
which a numeric selection is made.
"Bounce-bar": Here a list of topics is displayed, one of
which is highlighted. The user highlights
the appropriate topic to make a selection.
A first character search facility is
built-in and if used the requirement to
confirm selection by pressing <return> is
optional.
Virtual Here no template is associated with the
menu, allowing MENU, OPTION, RETURN, EXITM
and ENDM commands to implement an advanced
'case' construct. See WORDPROC.TSK.
$X$ MENU number,name {{,list_of_insertion_vars}}
OPTION number, option-number }} repeated for
TASKMASTER commands for this option }} each option
RETURN, EXITM or STOP }}
{{ENDM number}} only required when EXITM is used.
@end
@nf b8
@head centre,"The OPTION command"
@ban
@border
PUROSE Identifies the start of the {{CODE-BLOCK}} to be obeyed in
response to a menu selection.
OPTION blocks should be logically terminated by either a
RETURN, EXITM or STOP command.
$X$ OPTION menu-number,option-number{{,option-number-2}}
$Y$ menu-number is as defined in the MENU command.
NOTE2 Control will transfer to the command following the
OPTION command and commands will be obeyed until a
RETURN or EXITM command is encountered.
NOTE3 Refer to BBMASK system variable for details of which
options are executed as a result of special keys.
NOTE4 Option commands must be present for all selectable
options. Failure to locate the appropriate option command
causes a fatal error.
NOTE5 Option-number-2 if supplied, is shorthand for all options
between option-number and option-number-2 inclusively.
@end
@nf b9
@head centre,"The PUT command"
@ban
@border
PURPOSE Displays a form (or bounce-bar menu) from the forms file
and optionally waits for valid data to be entered.
$X$ PUT formname {{WAIT n}}{{NOCLEAR}}{{NODATA}}{{UL x}}{{SW field_no}}
where:
formname is mandatory naming the required SCR form,if WAIT
given: n is mandatory display time. if UL is supplied, x
is displayed on line 25. (unless NULL in which case line
25 not updated). field_no is an integer whose value is the
field in which to place cursor initially. NOCLEAR means no
clear screen afterwards, NODATA don't do data capture. The
keyword NOWAIT is equivalent to WAIT 0 NOCLEAR.
$Y$ Pressing a Function key in preference to completing the
form updates system variables ANYFK and FUNKEY.
NOTE2 To make forms timeout: use system variable TIMER.
NOTE3 PUT can display Bounce-bar menus. CHOICE and HILITE being
used to determine action to take.
NOTE4 Function keys are controlled by BBMASK system variable.
NOTE5 Optional parameters may be given in any order.
@end
@nf ba
@head centre,"The RETURN command"
@ban
@border
PURPOSE Causes the re-entry of a previously actioned menu
$X$ RETURN {{number-of-levels}}
RETURN {{100 + number-of-levels}}
$Y$ If the number-of-levels is specified, this will cause
control to be transferred to the appropriate higher-
level menu, e.g. RETURN 1 will cause a return to the
menu from which the current menu was invoked.
NOTE2 Sometimes it is convenient to use the RETURN command from
within a {{CODE-BLOCK}}, i.e. inside a series of
IF/WHILE/UNTIL commands; this is perfectly legal.
NOTE3 For bounce-bar menus: adding 100 to the number of levels
parameter causes an automatic selection to be made from
the menu returned to: as if user had returned and then
pressed <return>.
@end
@nf mc
@head left,"Disc and File handling"
$P$
@head centre,"Menu"
@ban
@border
@bbmenu white,red
{DIR }
{ERASE }
{GETVOL }
{LOOKFOR }
{RESTORE }
{SAVE }
{VERIFY }
{USER }
@col char,white,red
@win line2,column14,depth8,width60
Confirms a file exists
Erase file
Returns volume details
Confirms a file can be opened for reading
Restores datatype values from a file
Saves datatype values into a file
Verifies a filename
Gets / changes MS-DOS directory
$A$
@end
@nf c1
@head centre,"The DIR command"
@ban
@border
PURPOSE Confirms the existence of a named file.
$X$ DIR {{filename}}
Where filename is as for the LOOKFOR command. See also
note 5.
$Y$ If the named file exists, the system logical FOUND is set.
NOTE2 The system integer variable RESP is updated by DIR.
NOTE3 Only normal files are supported, i.e. not hidden files.
NOTE4 DISPLAY System Variable is set up as follows:
Byte 21 is the file attribute byte
Bytes 22-25 is file time stamp processed into a form
suitable for direct string comparison in IF
commands.
Bytes 30-42 is the filename terminated by 00h.
NOTE5 Filename may include wild cards * and ?, if it does then
subsequent DIR commands without a parameter will return
each matching files details in turn. See STANDARD.TSK. To
use this mode please refrain from using other commands
that update the DISPLAY system variable in the processing.
@end
@nf c2
@head centre,"The ERASE command"
@ban
@border
PURPOSE This command can be used to erase one or more files as an
alternative to running the MS-DOS ERASE or DEL utilities.
$X$ ERASE list-of-filenames
$Y$ The filenames can be ambiguous if required, using the
MS-DOS style wildcard characters ? and * ( where ?
matches any character and * matches any valid sequence of
characters ).
NOTE2 Filenames may be specified as strings, literals or
variables.
NOTE3 The system integer variable RESP contains the response
from MS-DOS which is normally zero when the file has been
successfully erased or 255 if the file did not exist.
$V$ ERASE "FRED?.*"
@end
@nf c3
@head centre,"The GETVOL command"
@ban
@border
PURPOSE To read a volume label that has been written to fixed or
removable media using the MS-DOS LABEL command. This has
obvious application when using removable media such as a
diskette and it is important to ensure that the correct
one has been loaded before attempting to use it.
$X$ GETVOL drive GIVING volume-label
DRIVE is the name of the drive, i.e. a letter A-P and may
be given as a string, literal or variable.
VOLUME-LABEL is a variable of declared size not less than
11 bytes.
$N$ If the specified drive does not have a volume label, the
system logical variable FOUND will be set to FALSE.
@end
@nf c4
@head centre,"The LOOKFOR command"
@ban
@border
PURPOSE Confirms the availability of a named file in the working
directory or in any directory named in the APPEND list.
$X$ LOOKFOR filename
Where filename is a list of datatypes composed of:
STRING
LITERAL
VARIABLE
and may comprise a full hierarchical filename.
$Y$ If the named file exists, the system logical FOUND is set
to TRUE.
NOTE2 The system integer variable RESP will be set to indicate
the reason in the event that the file was inaccessible;
RESP is set to 0 for success.
NOTE3 Use the DIR command if you don't wish the APPEND list to
be taken into consideration.
@end
@nf c5
@head centre,"The RESTORE command "
@ban
@border
PURPOSE Restores the nominated user datatypes to values previously
stored using the SAVE command.
$X$ RESTORE hierarchic-filename
SYNTAX2 RESTORE hierarchic-filename list-of-datatypes
SYNTAX3 RESTORE list-of-datatypes
SYNTAX4 RESTORE
Variant 1 opens the file ready for use.
Variant 2 opens the file and restores datatypes in list.
Variant 3 restores datatypes in list (after type 1 or 2).
Variant 4 closes the file.
$Y$ RESP set after command to report usual open or read errors
if any. Normally RESP should be zero.
NOTE2 Attempting to restore from an unsuitable file will cause
unpredictable results and set RESP to 99.
NOTE3 To reset the file to beginning: use variant 4 followed by
variant 1. See SAVE command.
@end
@nf c6
@head centre,"The SAVE command"
@ban
@border
PURPOSE Saves the contents of nomimated user datatypes into a file
for subsequent restoration using the RESTORE command.
$X$ SAVE {{APPEND}} hierarchic-filename
SYNTAX2 SAVE hierarchic-filename list-of-datatypes
SYNTAX3 SAVE list-of-datatypes
SYNTAX4 SAVE
Where: list-of-datatypes can contain variables, table-of-
var, integer variables and logical variables.
$Y$ RESP set after command to report usual Create or Write
errors if any. Normally RESP should be zero.
NOTE2 Variant 1 unconditionally creates a file unless the
APPEND clause is present. In append mode variant 3
SAVEs will write to the end-of-file.
NOTE3 One or more instances of variant 3 may be used and should
be followed by variant 4 to close the file.
NOTE4 Separate SAVE and RESTORE files may be open concurrently.
@end
@nf c7
@head centre,"The VERIFY command"
@ban
@border
PURPOSE This command provides comprehensive filename validation
capabilities. If you want to verify a Directory or
Pathname see the USER command and the SCR @PATH directive.
$X$ VERIFY filename USING error_code result
filename is the filename to verify, result is a variable
>= 14 bytes to receive the processed result.
@gon
Code Meaning Processed result
7---8---------------------------------9 7-------8--------------9
0 0 0 filename valid. 0 0byte 00 drive letter 0
0 1 0 filename too long or filename 0 4-------5--------------6
0 0 is a NULL variable. 0 0byte 10 a colon 0
0 2 0 filename is SPACE filled. 0 4-------5--------------6
0 3 0 drive only given - no filename. 0 0bytes 20 the filename 0
0 4 0 drive name invalid (a-p or A-P) 0 0thru 90 0
0 5 0 invalid character in filename. 0 4-------5--------------6
0 6 0 filename part exceeds 8 chars 0 0byte 100 a full stop 0
0 7 0 ext exceeds 3 chars 0 4-------5--------------6
1---2---------------------------------3 0bytes110 the filetype 0
0thru 130 0
1-------2--------------3
@end
@nf c8
@head centre,"The USER command"
@ban
@border
PURPOSE Emulates the MS-DOS CHDIR command. To obtain the current
directory/path.
$X$ USER user_var
where user_var is a literal, string or variable containing
the required pathname or a {{NULL}} VARIABLE.
$Y$ If user_var is a NULL variable the USER command will
return the currently selected directory in user_var. Upto
68 characters may be returned the drive identifier and a
colon will always be returned.
NOTE2 Taskmaster remembers its working directory and so can
continue to read the task and forms.
NOTE3 DO NOT use the MS-DOS CHDIR command via the RUN command.
NOTE4 Please TRIM user_var.
NOTE5 Following successful completion the USER command sets the
system variable RESP to 0. A non-zero value in RESP
indicates failure.
@end
@nf md
$P$
@head left,"Diagnostics"
@head centre,"Menu"
@ban
@border
@bbmenu white,red
{NOTRACE }
{STEP }
{TRACE }
@col char,white,red
@win line2,column14,depth3,width60
Stops trace mode
Enter Single Step Mode - pause at each command.
Display each command as it executes
$A$
@end
@nf d1
@head centre,"The NOTRACE command"
@ban
@border
PURPOSE Stops echo of commands to the console during execution of
a task by the Interpreter.
$X$ NOTRACE
$Y$ Resets STEP - See STEP command.
NOTE2 Resets TRACE.
@end
@nf d2
@head centre,"The STEP command"
@ban
@border
PURPOSE This command causes a pause before each command is
executed. Thus when TRACE is set, commands will be
displayed one at a time for perusal.
$X$ STEP
$Y$ The command is ignored if a TRACE command has not
previously been issued.
NOTE2 Upon encountering this command, the Interpreter will
display the following message on the screen :
... Single-step mode selected (CTRL/D to De-activate)
The next and successive commands will be displayed and
Taskmaster will suspend until you press a key. If you
press <CTRL> and D together single step mode will be
terminated.
NOTE3 If a NOTRACE command is encountered the effects of the
STEP command will be cancelled.
@end
@nf d3
@head centre,"The TRACE command"
@ban
@border
PURPOSE Echoes commands to the terminal as they are being
executed, until a NOTRACE command is encountered.
$X$ TRACE
$Y$ Whenever an IF / UNTIL / WHILE command is being obeyed,
the result of the associated condition will be
displayed and the block level, e.g.
UNTIL CTIME sw "22:00"
FALSE (01)
WAIT 58
MOVE TIME TO CTIME
FI
NOTE2 Single stepping of commands is achieved with the STEP
command and can only be used when TRACE mode has been set.
@end
@eof